home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / e / mailinglists / amigae.0294feb.archive / 000036_donews!crash!w….std.com!cosell_Thu, 10 Feb 94 01:37:24 PST.msg < prev    next >
Internet Message Format  |  1994-05-26  |  4KB

  1. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  2.       id <1sib@bkhouse.cts.com>; Thu, 10 Feb 94 01:37:24 PST
  3. Received: from crash by donews.cts.com with uucp
  4.     (Smail3.1.28.1 #18) id m0pURgr-0001o1C; Wed, 9 Feb 94 22:03 EST
  5. Received: from news.std.com by crash.cts.com with smtp
  6.     (Smail3.1.28.1 #18) id m0pURd0-00002kC; Wed, 9 Feb 94 18:59 PST
  7. Received: from world.std.com by news.std.com (5.65c/Spike-2.1)
  8.     id AA21700; Wed, 9 Feb 1994 21:59:40 -0500
  9. Received: by world.std.com (5.65c/Spike-2.0)
  10.     id AA14360; Wed, 9 Feb 1994 21:59:38 -0500
  11. X-Mailer: //\\miga Electronic Mail (AmiElm 2.253)
  12. Content-Length: 775
  13. Date: Wednesday, 9 February 1994 21:23 EST
  14. Organization: Fantasy Farm Fibers
  15. Message-Id: <5883:77010@fantasyfarm.com>
  16. From: bernie@fantasyfarm.com (Bernie Cosell)
  17. To: AmigaE@bkhouse.cts.com
  18. Subject: Bugs in the Mod() function
  19.  
  20. After a lot of debugging of code that ought to have worked, I
  21. discovered that the Mod function seems to be VERY broken.  As we
  22. [ought to] all know, taking an integer mod N should *always* get you
  23. an integer between 0 and n-1.  Well, it ain't so in E.  A simple
  24. test reveals:
  25.  
  26. Modulo: Mod(11,8) = 3
  27. Modulo: Mod(6,8) = 6
  28. Modulo: Mod(1,8) = 1
  29. Modulo: Mod(-4,8) = -4
  30. Modulo: Mod(-9,8) = -1
  31. Modulo: Mod(-14,8) = -6
  32.  
  33. Which is clearly broken.  In the course of pursuing this, I discovered
  34. that simple division ain't a prize, either:
  35.  
  36. Dividing 11 / 8 = 1
  37. Dividing 6 / 8 = 0
  38. Dividing 1 / 8 = 0
  39. Dividing -4 / 8 = 0
  40. Dividing -9 / 8 = -1
  41. Dividing -14 / 8 = -1
  42.  
  43. It is astounding to me to try to understand arithmetic in an environment
  44. where:
  45.  
  46.     (A - B) / B  does *NOT* equal (A / B) - 1
  47.  
  48. /Bernie\
  49. -- 
  50. Bernie Cosell                               bernie@fantasyfarm.com
  51. Fantasy Farm Fibers, Pearisburg, VA         (703) 921-2358
  52. From donews!crash!freenet.carleton.ca!ao443 Thu, 10 Feb 94 01:38:13 PST
  53. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  54.       id <1sj8@bkhouse.cts.com>; Thu, 10 Feb 94 01:38:13 PST
  55. Received: from crash by donews.cts.com with uucp
  56.     (Smail3.1.28.1 #18) id m0pUSeI-0001w2C; Wed, 9 Feb 94 23:05 EST
  57. Received: from freenet-news.carleton.ca by crash.cts.com with smtp
  58.     (Smail3.1.28.1 #18) id m0pUSSt-00008HC; Wed, 9 Feb 94 19:53 PST
  59. Received: from freenet.carleton.ca by freenet-news.carleton.ca (4.1/SMI-4.0)
  60.     id AA26817; Wed, 9 Feb 94 22:53:38 EST
  61. Received: from localhost (ao443@localhost) by freenet.carleton.ca (8.6.4/8.6.4) id WAA17369; Wed, 9 Feb 1994 22:53:04 -0500
  62. Date: Wed, 9 Feb 1994 22:53:04 -0500
  63. Message-Id: <199402100353.WAA17369@freenet.carleton.ca>
  64. Reply-To: ao443@freenet.carleton.ca
  65. From: ao443@freenet.carleton.ca (Jason Maskell)
  66. To: amigae@bkhouse.cts.com
  67. Subject: Some stuff..
  68.  
  69.     Well, some announcements, etc..
  70.     I have just uploaded  Eformat 1.4  to aminet after having
  71. ferretted  out the machine guruing bug. It  was Eformat. (I wasn't
  72. initializing  the stack pointer.. duh.) So, to fix it, I switched to the
  73. stack code in the E source archive. Now works like a charm, again. The
  74. reason I even saw the bug is because the nested case stuff  wasn't working
  75. on some WouterCode, when fixing that, I noticed the stack problem. My 
  76. apologies to the person who reported the bug. My fault!
  77.  
  78.     Also, H2e is almost complete and should be up within the week. It
  79. works fine so far, but does not do the following:
  80. - any code!
  81. - global/extern variables
  82. - string constants
  83. - Other goodies
  84.  
  85.  
  86. --
  87. 'You see son, if this were Star Trek, we'd be negotiating with this Kobold.'
  88. - Unknown Angband Player